<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<SCRIPT src="js/jquery.js" type=text/javascript></SCRIPT>
		<SCRIPT src="js/interface.js" type=text/javascript></SCRIPT>
		<link href="css/div_show.css" rel="stylesheet" type="text/css" media="all">
		<META content="MSHTML 6.00.6000.16735" name=GENERATOR>
		<title>新闻首页</title>
		<link href="css/table.css" type="text/css" rel="stylesheet" />
		<script language="javascript" src="js/table.js"></script>
		<style type="text/css">
table{
	border: 0px solid black;
	border-collapse: collapse;
}

table thead tr th {
	border: 1px solid black;
	padding: 2px;
	background-color: #cccccc;
}
</style>
	</head>
	<body>
		<center>
			<h3>
				新闻发布
			</h3>
			<h3>
				<a href="/Struts2new/addnews.jsp">添加新闻</a>
			</h3>
			<h3>
				<A id=windowOpen 
href="http://interface.eyecon.ro/demos/windows.html#">管理员登陆</A> 
			</h3>
			<DIV id=window>
			<DIV id=windowTop>
			<DIV id=windowTopContent>登陆界面</DIV>
			<IMG id=windowMin src="css/images/window_min.jpg"> 
			<IMG id=windowMax src="css/images/window_max.jpg"> 
			<IMG id=windowClose src="css/images/window_close.jpg"> 
			</DIV>
			<DIV id=windowBottom>
			<DIV id=windowBottomContent></DIV></DIV>
			<DIV id=windowContent type="border=0px;">
			<center><h3><font color="green">管理员登陆</font></h3>
		<s:form action="login" theme="simple">
			<table align="center" width="80%" type="border=0px;">
				<tr height="20" >
					<td type="width:150;">
						用户名：
					</td>
					<td>
						<s:textfield name="admin.aname" label="用户名"></s:textfield>
					</td>
				</tr>
				<tr>
					<td type="width:150;">
						密码：
					</td>
					<td>
						<s:password name="admin.apassword" label="密码"></s:password>
					</td>
				</tr>
				<tr>
					<td>
						<s:submit value="登陆" />
					</td>
					<td>
						<s:reset value="重置" />
					</td>
				</tr>
			</table>
			</s:form>
			</DIV>
			<IMG id=windowResize src="css/images/window_resize.gif"> 
			</DIV>
		</center>
		<center>
		<table id="senfe" type=" border=1px;">
			<thead>
				<tr>
					<th>
						编号
					</th>
					<th>
						标题
					</th>
					<th>
						作者
					</th>
					<th>
						日期
					</th>
					<th>
						操作
					</th>
				</tr>
			</thead>
			<tbody>
				<s:iterator value="Newss">
					<tr>
						<td>
							<s:property value="id" />
						</td>
						<td>
							<s:property value="title" />
						</td>
						<td>
							<s:property value="name" />
						</td>
						<td>
							<s:property value="date" />
						</td>
						<td>
							<a
								href='<s:url action="show"><s:param name="id" value="id" /></s:url>'>
								查看详细</a> &nbsp;
						</td>
					</tr>
				</s:iterator>
			</tbody>
			<script language="javascript">
			//senfe("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景");
				senfe("senfe","#fff","#ccc","#cfc","#f00");
			</script>
		</table>
		</center>
		</br>
		<center>
		共<s:property value="intRowCount"/>记录&nbsp;&nbsp;
		第<s:property value="pageNow"/>页&nbsp;&nbsp;
		 <s:url id="url_pre" value="list.action">   
         <s:param name="pageNow" value="pageNow-1"></s:param>   
     </s:url>   
  
     <s:url id="url_next" value="list.action">   
         <s:param name="pageNow" value="pageNow+1"></s:param>   
     </s:url>   
     <s:iterator value="Newss" status="status">   
        <s:url id="url" value="list.action">   
            <s:param name="pageNow" value="pageNow"/>   
        </s:url>   
     </s:iterator>    
     <s:if test="pageNow==1">
	<s:a href="%{url_pre}">最前一页</s:a>
     </s:if>
     <s:else>
     <s:a href="%{url_pre}">上一页</s:a>
     </s:else>
     <s:if test="pageNow==k">
     <s:a href="%{url_next}">最后一页</s:a>
  	 </s:if>
  	 <s:else>
  	 <s:a href="%{url_next}">下一页</s:a>
  	 </s:else>
  	 </center>
  	 <SCRIPT type="text/javascript" src="js/div_show.js"></SCRIPT>
	 <SCRIPT language=JavaScript type=text/javascript>var client_id = 1;</SCRIPT>
	</body>
</html>
